home *** CD-ROM | disk | FTP | other *** search
/ Digital Photo Album: Houko Kuwashima / Digital Photo Album: Houko Kuwashima.iso / trump_d.dxr / 00004.ls < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.1 KB  |  45 lines

  1. on exitFrame
  2.   global objlist, objfglist
  3.   set temp to 1
  4.   set rightcards to [0, 0]
  5.   set cardspoint to 0
  6.   repeat with i = 1 to 24
  7.     set thisobj to getAt(objlist, i)
  8.     if (the myside of thisobj = 1) and (getAt(objfglist, i) = 1) then
  9.       setAt(rightcards, temp, thisobj)
  10.       set temp to temp + 1
  11.     end if
  12.   end repeat
  13.   if the myphoto of getAt(rightcards, 1) = the myphoto of getAt(rightcards, 2) then
  14.     remove(getAt(rightcards, 1))
  15.     remove(getAt(rightcards, 2))
  16.     repeat with i = 1 to 24
  17.       set cardspoint to cardspoint + getAt(objfglist, i)
  18.     end repeat
  19.     if cardspoint = 0 then
  20.       go("clear_game")
  21.     else
  22.       go("bingo")
  23.     end if
  24.   else
  25.     repeat with i = 30 to 35
  26.       if getAt(missmarklist, i - 29) = 0 then
  27.         set the visible of sprite i to 1
  28.         setAt(missmarklist, i - 29, 1)
  29.         exit repeat
  30.       end if
  31.     end repeat
  32.     set misstimes to 0
  33.     repeat with i = 30 to 35
  34.       set misstimes to misstimes + getAt(missmarklist, i - 29)
  35.     end repeat
  36.     if misstimes = 7 then
  37.       puppetSound("miss.AIF")
  38.       go("try_again")
  39.     else
  40.       puppetSound("miss.AIF")
  41.       go("clear_card")
  42.     end if
  43.   end if
  44. end
  45.